1. Field of the Invention
The present invention relates to a digital-to-analog converter (DAC) of the type providing, from a digital signal, a pulse width modulated signal having its average value corresponding to an analog signal, and to a method for converting a digital signal into a pulse-width modulated signal.
2. Discussion of the Related Art
An example of application of a digital-to-analog converter is the provision of audio signals in which a digital signal is converted into a pulse-width modulated signal to control a loudspeaker. Another example of application relates to the provision, from a digital signal, of a pulse-width modulated signal for the control of a motor.
FIG. 1 shows an example of a digital-to-analog converter 10 for the control of a load 12, for example, a loudspeaker or a motor. Converter 10 receives, at a frequency F1, a digital signal IN corresponding to a succession of coded messages over a determined number of bits, for example, from 16 to 24 bits, and providing, at frequency F1, a two-state pulse-width modulated signal PWM which drives a class-D amplifier 16. Converter 10 is a digital-to-analog converter since the PWM signal, although being a binary signal, has an average value which corresponds to a digital signal. Amplifier 16 provides an amplified signal OUT for the control of load 12. Converter 10 comprises a PCM conversion unit 18, also called noise shaper which receives, at a first input, signal IN and which provides, at frequency F1, a pulse-code modulated digital signal PCM to a PWM conversion unit 20 which provides the PWM signal. The PCM signal is a digital signal, for example, over 3 or 4 bits, enabling coding M+1 values or states. The PCM signal is also provided by a feedback loop 21 to a second input of PCM conversion unit 18. PWM conversion unit 20 is controlled by a periodic control signal CLK from which the PWM signal is provided.
FIG. 2 illustrates an example of variation of the PWM signal according to the different states coded by the PCM signal. In the present example, a PCM signal coding 9 states has been shown (that is, for M equal to 8). Frequency F1 corresponds to the frequency of provision of a new value of the PCM signal by PCM conversion unit 18. The PWM signal is a signal with two high and low states such that during a cycle of duration T1, inverse of frequency F1, the duration of the PWM signal in the high state depends on the PCM signal received by PWM conversion unit 20. Duration T2 corresponds to the minimum time for which the PWM signal can be in the high state or in the low state during a cycle. Duration T2 characterizes the resolution of PWM conversion unit 20 and is equal to T1 divided by M so that the PWM signal can code the M+1 states that the PCM signal can take. To achieve such a resolution, it is necessary for control signal CLK to have a frequency F2, inverse of time T2, equal to M times frequency F1.
Such a digital-to-analog converter associated with a class-D amplifier enables performing a digital-to-analog power conversion while ensuring a high efficiency and a good immunity to electric imperfections of the class-D amplifier.
PCM conversion circuit 18 enables converting a digital signal having a determined number of bits into a digital signal having a smaller number of bits while rejecting part of the quantization noise introduced by such a conversion outside a useful frequency band. The pulse-width modulation being a non-linear process, the conversion of the PCM signal into a PWM signal causes the occurrence of spectral crosstalk components. Since a non-negligible part of the power of the PCM signal provided by PCM conversion unit 18 is present in the form of quantization noise outside of the useful frequency band, the crosstalk components cause a significant increase of the noise level in the useful frequency band on conversion of the PCM signal into a PWM signal. There thus is a degradation of the signal-to-noise ratio at the converter output, in other words, for an audio application, a degradation of the quality of the audio signal provided by loudspeaker 12.
There are two solutions to avoid such disadvantages:
A first solution is to decrease the quantization noise at the output of PCM conversion unit 18 by increasing the number of states that the PCM signal can code. The quantization noise decrease enables decreasing the crosstalk components resulting from the PWM modulation, which limits the degradation of the quality of the PWM signal. However, an increase in the number of states that the PCM signal can code implies an increase in the resolution of the PWM signal and thus requires an increase in the frequency of control signal CLK of PWM conversion unit 20. A disadvantage of such a solution is that the provision of control signal CLK at a high frequency requires use of expensive components, for example, phase-locked loops.
FIG. 3 shows a second solution which provides, at the level of feedback loop 21 which provides the PCM signal at the input of PCM conversion unit 18, a unit with a variable transfer function 22 which models the frequency response of PWM conversion unit 20. PCM conversion unit 18, which behaves as a bandpass filter towards the noise introduced into feedback loop 21, thus filters the noise present in the useful frequency band of the signal provided by variable transfer function unit 22, which provides a PWM signal having an acceptable noise level in the useful frequency band.
A disadvantage of such a solution is that it requires use of a filtering unit 22 for modeling the frequency response of PWM conversion unit 20. Such a transfer function is particularly difficult to model, in particular because it varies for each value that can be taken by the PCM signal. Variable transfer function unit 22 thus generally requires a significant number of logic operations and storage elements and thus exhibits a significant bulk and a non-negligible manufacturing cost.